package com.liaogui.event.handler;

import com.liaogui.event.conf.SpringUtils;
import com.liaogui.event.event.OrderStatusEvent;
import org.springframework.stereotype.Component;

/**
 * 订单状态监听服务
 * @author liaogui
 * @date 2025/2/9 15:52
 */
@Component
public class OrderStatusEventHandler {
    public void statusHandler(String orderId, String status) {
        OrderStatusEvent event = new OrderStatusEvent();
        event.setOrderId(orderId);
        event.setStatus(status);
        SpringUtils.context().publishEvent(event);
    }
}
